package com.base.service.system.service.impl;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.base.core.framework.sql.service.impl.SqlBaseServiceStreamImplV1Ext;
import com.base.core.head.constants.CodeResVal;
import com.base.service.system.ao.RoleAO;
import com.base.service.system.dao.RoleDao;
import com.base.service.system.entity.RoleDO;
import com.base.service.system.service.RoleService;
import com.base.service.system.vo.RoleVO;

/**
 * @author start
 */
@Service("roleService")
public class RoleServiceImpl extends SqlBaseServiceStreamImplV1Ext<RoleDO,RoleVO> 
implements RoleService {

	@SuppressWarnings("unused")
	private final RoleDao roleDao;
	
	public RoleServiceImpl(@Qualifier("roleDao")RoleDao roleDao) {
		super(roleDao,RoleVO.class);
		this.roleDao=roleDao;
	}
	
	@Override
	public Long saveForUpdate(RoleAO ao){
		select1(ao.getId(),"code", ao.getCode(), CodeResVal.CODE_10020);
		return saveForUpdate(ao.getId(), ao);
	}
	
}
